package org.gaaidou.ptarmigan.springboot.functional.bean;


import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import org.gaaidou.ptarmigan.springboot.data.jpa.entity.BaseEntity;
import org.gaaidou.ptarmigan.springboot.data.jpa.entity.EnumType;
import org.hibernate.annotations.Type;

import java.util.Date;

@Setter
@Getter
@Entity
@Table(name = "t_experience")
public class Experience extends BaseEntity {


    private Date startTime;

    private Date endTime;

    @Type(value = EnumType.class)
    private RoleType role;

    @ManyToOne(cascade = {CascadeType.MERGE, CascadeType.REFRESH}, optional = false)
    @JoinColumn(name = "user_id")
    private User user;
}
